package com.chushouya.manager.dto.admin.notice;

import com.general.framework.core.lang.Dates;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel("用户消息列表")
public class UserNoticeDTO {

    @ApiModelProperty("用户消息通知ID")
    private Long userNoticeId;

    @ApiModelProperty("消息通知ID")
    private Long noticeId;

    @ApiModelProperty("消息标题")
    private String title;

    @ApiModelProperty("消息内容")
    private String content;

    @ApiModelProperty("发送人")
    private String sender;

    @ApiModelProperty("消息场景")
    private String bizScene;

    @ApiModelProperty("消息场景业务ID")
    private String bizId;

    @ApiModelProperty("重要级别(1日常通知 2重要通知)")
    private Integer noticeLevel;

    @ApiModelProperty("发送时间")
    private Date receiveTime;

    @ApiModelProperty("发送时间")
    private String timeAgo;

    @ApiModelProperty("读取状态")
    private Integer readStatus;

    public String getTimeAgo() {
        return Dates.getTimeAgo(this.receiveTime);
    }
}
